<?php global $isHome;?>

<div id="tt-sidebar">

<?php if ($isHome):?>
<div id="tt-sidebar-d" class="colwide about">
<h3>About Joe Tan</h3>
<p>Hey, somehow you've found my personal blog (cool!). I should probably mention that opinions expressed here on this blog 
are my own and not of my employer, though I will occasionally mention the stuff I do at <a href="http://www.silaspartners.com">work</a>.
</p>
<p>
So who am I? Web developer, guitar player, worship leader, music listener, bike rider, video gamer, 
Apple lover, wordpress blogger, Bloglines user, <s>snowboarder</s> downhill skier, 
<s>available</s> bachelor, movie watcher, Canucks follower, <s>Vi</s> <s>Emacs</s> Pico hater, and last but definately not least, from Vancouver.  
These are just a few of the <nobr>-er's</nobr> that <a href="/about/">describe me</a>, most of which have been verified to be true. 
</p>
</div>
<?elseif (is_single()): ?>
<? endif; ?>

<div id="tt-sidebar-adunit" class="colwide advert">
<h3>Advertisements</h3>
<div class="code">
<script type="text/javascript"><!--
google_ad_client = "pub-3390402430226178";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="1993028228";
google_color_border = "F2F2E9";
google_color_bg = "F2F2E9";
google_color_link = "D7380F";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</div>

<?php /*
<div id="tt-sidebar-recommendations" class="colwide advert">
<h3>Recommendations</h3>
<div class="code">
<? tantan_getAmazonRecommended(); ?>
</div>
</div>
*/ ?>
<?php if (!$isHome):?>
<div id="tt-sidebar-music" class="colwide advert">
<h3>Music Podcast</h3>
<? 
$myquery = $wp_query;
?>
<ul class="list-idx">
<?php query_posts('cat=30&showposts=3'); ?>

  <?php while (have_posts()) : the_post(); 
  
    $enclosure = get_post_meta($post->ID, 'enclosure', true);
    $infoClass = '';
    $infoHTML = '';
    if ($enclosure) {
        $mp3 = split("\n", $enclosure);
        if (!$mp3[2] || ($mp3[2] && ereg('audio',$mp3[2]))) {
            $infoHTML = '- Audio MP3, '.round($mp3[1] / 1048576, 1).' MB';
            $infoClass = 'audio';
        }
    }
  ?>
   <li><a href="<?php the_permalink() ?>" class="<?=$infoClass?>"><?php the_title() ?></a> <small class="date"><?=$infoHTML?></small></li>
  <?php endwhile;?>
  <li><a href="/category/music-podcast/">More music...</a>
 &nbsp; &nbsp;
  <a href="http://feeds.feedburner.com/TanTanMusic"><img src="http://i.tantannoodles.com/images/feed/12x12.gif" width="12" height="12" title="Music feed" border="0" /></a>

 </li>
</ul>
<?
$wp_query = $myquery;
?>
<!--
<a href="/category/music-podcast/">Show me more music...</a>
-->
</div>
<?php endif;?>

<div id="tt-sidebar-a" class="col">

<?php
if (!$isHome):
$myquery = $wp_query;
query_posts('cat=7&showposts=5');?>
<?if (have_posts()): ?>

<h3>Distractions</h3>
<ul class="distractions">
<?while (have_posts()) : the_post(); ?>
<li><?=the_content()?>
<small class="desc">(<?php comments_popup_link('0 comments', '1 comment', '% comments', 'comments', ''); ?>)</small>
</li>
<?endwhile;?>
<li>
<a href="/category/links/">More distractions...</a>
&nbsp; &nbsp;
<a href="http://feeds.feedburner.com/TanTanDistractions"><img src="http://i.tantannoodles.com/images/feed/12x12.gif" width="12" height="12" title="Distractions feed" border="0" /></a>
</li>

</ul> 
<?endif;
$wp_query = $myquery;
endif;
?>
<?php if ($isHome):?>
<h3>Recent Web Sites</h3>
<p><? get_links(36, '', ',', '', false, '_id', false, false, 10);?>
<a href="/recent-web-sites/">and more</a>.<br />
<small class="desc">(sites I've worked on)</small>
</p>

<h3>Useful Links</h3>
<p>
<a href="http://www.dreamhost.com/r.cgi?jtan54" title="Cheap (and reliable) web hosting">Dreamhost</a>,
<a href="http://www.getfirefox.com">Firefox</a>,
<a href="http://www.wordpress.org" title="It's what powers this site!">WordPress</a>,
<a href="http://www.apple.com" title="">Apple</a>, 
<a href="http://www.writersblocklive.com">Writers Block Live</a>,
<a href="http://www.google.com" title="">Google</a>.<br />
<small class="desc"></small>
</p>

<?php endif;?>
</div>

<?php //miniblog_list_entries('<li>', '', '</li>', 'linkroll', 5); ?>

<div id="tt-sidebar-b" class="col">
<?php if (!$isHome):?>
<h3>Recent Web Sites</h3>
<p><? get_links(36, '', ',', '', false, '_id', false, false, 10);?>
<a href="/recent-web-sites/">and more</a>.<br />
<small class="desc">(sites I've worked on)</small>
</p>
<?php endif;?>

<h3>Everything Joe</h3>
<p><? get_links(32, '', ',', '', false, 'name', false, false); ?>
<a href="http://tantannoodles.com">this site</a>.<br />
<small class="desc">(my online links)</small>
</p>

<h3>Other Blogs of Note</h3>
<p><? get_links(35, '', ',', '', false, 'rand', false, false); ?>
<a href="http://technorati.com/search/http://tantannoodles.com">and</a> <a href="http://blogsearch.google.com/blogsearch?hl=en&q=link%3Atantannoodles.com">others</a>.<br />
<small class="desc">(my friends online)</small>
</p>
<?php if (!$isHome):?>
<h3>Useful Links</h3>
<p>
<a href="http://www.dreamhost.com/r.cgi?jtan54" title="Cheap (and reliable) web hosting">Dreamhost</a>,
<a href="http://www.getfirefox.com">Firefox</a>,
<a href="http://www.wordpress.org" title="It's what powers this site!">WordPress</a>,
<a href="http://www.apple.com" title="">Apple</a>, 
<a href="http://www.writersblocklive.com">Writers Block Live</a>,
<a href="http://www.google.com" title="">Google</a>.<br />
<small class="desc"></small>
</p>

<?php endif;?>
</div>

<?if (!$isHome):?>
<div class="colwide">
<h3>In case you missed it</h3>
<ul class="list-idx">
<?php query_posts('cat=1&showposts=5'); ?>

  <?php while (have_posts()) : the_post(); ?>
   <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a> <small class="date">- <?php the_date() ?>, <a href="<?php comments_link()?>"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a></small><br />
   <?php //the_excerpt()?></li>
  <?php endwhile;?>
  
</ul>
</div>
<?endif;?>

<?php
/*
$TanTanReportsMostActive =& new TanTanReportsMostActive();
if (is_object($TanTanReportsMostActive)):?>
<div class="colwide">
<h3>Other Popular Stuff</h3>

<?php $TanTanReportsMostActive->display(array(
    'pattern' => "(2.*)index.php$",
    'max' => 5,
    ));
?>
</div>
<?php endif;
*/
?>

<div id="tt-sidebar-search" class="colwide">
<h3>Site Search</h3>
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<input type="hidden" name="sitesearch" value="tantannoodles.com" />
<input type="hidden" name="domains" value="tantannoodles.com" />
<input type="hidden" name="client" value="pub-3390402430226178" />
<input type="hidden" name="forid" value="1" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="hidden" name="oe" value="ISO-8859-1" />
<input type="hidden" name="cof" value="GALT:#008800;GL:1;DIV:#999999;VLC:336633;AH:center;BGC:ffffff;LBGC:F2F2E9;ALC:003399;LC:003399;T:000000;GFNT:666666;GIMP:666666;LH:50;LW:300;L:http://tantannoodles.com/styles/images/logo-single.gif;S:http://tantannoodles.com/;FORID:1;" />
<input type="hidden" name="hl" value="en" />

<input type="text" name="q" size="31" maxlength="255" value="" />
<input type="submit" name="sa" value="Search" />

</form>
&nbsp;
<!-- SiteSearch Google -->
</div>

<div id="tt-sidebar-c" class="colwide">
<h3>Subscribe to this Site</h3>
<p>Get notified when updates are made to this site! 
Just grab a link below and paste it into your favorite RSS reader. 
Click on a link to get a quick preview of the feed.
</p>
<!--
<p>
<a href="http://tantannoodles.com/feed/" id="btn-subscribe">Subscribe to the Main Feed</a>
</p>
-->

<ul class="feeds">
<li class="main"><a href="http://feeds.feedburner.com/TanTanNoodles" title="Subscribe to main posts only">Subscribe to the Main Feed</a><br />
<span class="feed">Posts on the main homepage</span></li>
<li class="toolkit"><a href="http://feeds.feedburner.com/TanTanToolkit" title="Tell me when updates are made to Joe's plugins and scripts">Subscribe to Toolkit Updates</a><br />
<span class="feed">Updates to WordPress plugins and other scripts</span></li>
<li class="music"><a href="http://feeds.feedburner.com/TanTanMusic" title="Free full-length MP3 tracks delivered to your iPod">Subscribe to the Music Podcast</a><br />
<span class="feed">Free full-length MP3 tracks</span></li>

<li class="distractions"><a href="http://feeds.feedburner.com/TanTanDistractions" title="Send me Random Distractions">Subscribe to Distraction Links</a><br />
<span class="feed">Random links to random places</span></li>
<li class="everything"><a href="http://feeds.feedburner.com/TanTanEverything" title="Give me Everything!">Subscribe to Everything TanTan</a><br />
<span class="feed">Everything as one feed</span></li>

<li class="xanga"><a href="http://www.xanga.com/joetan54" title="Subscribe to this site with Xanga">Subscribe with Xanga</a><br />
<span class="feed">Get updates via Xanga</span></li>
<!--
<li class="myspace"><a href="http://www.myspace.com/index.cfm?fuseaction=blog.confirmsubscribe&friendID=31938666" title="Subscribe to this site with MySpace">Subscribe with MySpace</a></li>
<li><a href="http://tantannoodles.com/comments/feed/" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr> 2.0</a></li>
<li><a href="http://feeds.feedburner.com/noodledistractions" title="tantannoodles.com distractions">Distractions Feed</a>
<li><img src="http://feeds.feedburner.com/~fc/tantannoodles?bg=99CCFF&amp;fg=444444&amp;anim=0" height="26" width="88" style="border:0" alt="" /></li>
<li><a href="http://tantannoodles.com/wp-content/plugins/miniblog.php?action=rss&amp;n=10&amp;o=0&amp;q=linkroll&amp;s=_Date&amp;t=tantannoodles.com+distractions&amp;d=%25site_description%25">Distractions RSS 2.0</a>
-->
</ul>
</div>
</div>